<include file="./Public/Home/header.html" />
<div class="task">
    <div class="takContent">
        <h1>任务预告</h1>
        <p>各位士兵们，我们刚收到消息：<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$msg.msg}</p>
    </div>
    <div class="taskBtn">
        <a href="javascript:void(0)" onclick="signUp({$classInfo.id},'signup')">预签到</a>
        <a href="javascript:void(0)" onclick="signUp({$classInfo.id},'leave')">请假</a>
    </div>

</div>
<script>
    function signUp(id,type) {
        $.ajax({url:"/Home/UserCenter/ajaxSignup",type:'post',data:{id:id,type:type},dataType:"json",success:function(result){

            var result = eval(result);
            if (result.code == 200){
                var name = "成功";
                var url = '/Home/UserCenter/myCourses'
                Prompt(name,result.msg,url);
            }else {
                var name = "失败";
                var url = '/Home/UserCenter/myCourses'
                Prompt(name,result.msg,url);
            }
        }});

    }

</script>
<include file="./Public/Home/footer.html" />
